﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HomeWork2_3
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int[] a = new int[101];
            a[0] = -1;//从1开始，存入
            for (int i = 1; i < 100; i++)
            {
                a[i] = i;
            }
            for (int i = 2; i < 100; i++)
            {
                int count = 2;
                int beishu = i*2;
                while (beishu <= 100)
                {
                    count++;
                    a[beishu] = -1;
                    beishu =i* count;

                }
            }
            for (int i = 2; i < 101; i++)
            {
                if (a[i] != -1)
                    Console.Write(a[i] + " ");
            }
            Console.ReadKey();
        }
    }
}
